package com.haruhi.event;

import javax.websocket.Session;

public class Message {
    private final Session session;
    private final String content;
    private final MessageSource source;

    /**
     *
     * @param session
     * @param content
     * @param source 标识本次消息来自哪个端(远程端！)若消息是远程ws服务端传来的，那么source就是SERVER 反之...
     */
    public Message(Session session, String content, MessageSource source) {
        this.session = session;
        this.content = content;
        this.source = source;
    }

    public MessageSource getSource() {
        return source;
    }

    public Session getSession() {
        return session;
    }

    public String getContent() {
        return content;
    }
}
